Computer systems typically consist of one or more processors that control some externally attached devices by servicing events and issuing commands in response. The communication between devices and CPUs is performed via signals that represent discrete states (bits of information, data). These recognizable states represent some abstractions like specifics of the exchanged events and commands. The information coming from input devices (keyboard, mouse, scanner, video) is processed in many stages, transformed to commands and passed to output devices (monitors, printers, etc). Typically, this process requires some state of execution, which is maintained in random access memory.
The CPUs operate by performing operations based on data in memory locations. The exact operations are encoded in stream of defined by the CPU instructions, also typically kept in memory. The instructions are performed one-at-a-time and each specifies the location of the next instruction to be executed. In order to perform more complicated operations on data, instructions are grouped into functions, which are used by storing in predefined location:                parameters for their execution        the address of instruction that has to be executed after the function completes (return address)        
Initially, the first instruction of a function (entry point) is executed. The function executes some of its instructions, depending on the data and gives control at the return address. In this way functionality can be expressed once into instructions and used from many other pieces of code. In order to hide the function encoding from the programmer, high-level languages are designed to replace instructions for concrete CPU with platform independent expression of functionality, giving names to functions and data types. Data types are defined to describe how data in memory is to be processed.
Instantiating a type binds a memory location with it. Further references to this instance produce instructions, according to the type and the operations specified in the source code. Source code follows the function model—set of functions calling each other, giving parameters. This has lead to procedural programming. When the amount of functions in a software system grows beyond certain point, grouping of the functionality is required. Functions, having parameter of same type, are considered extenders of this type's operations. This has lead to object-oriented programming. The need to produce automatically similar functions, operating on different types of data, has lead to generic functions and generic types.
Certain devices are used to store information that has to be processed later. For example, a hard disk is a form of non-volatile memory organized as an array of blocks (sectors). Each block has unique address via which it may be accessed randomly. The storage allows reads or writes of data blocks at random offset.
A file system provides means for sharing storage among many logical entities—many pieces of information required for subsystems, tasks, users, computers and others' needs. To make sharing possible, a file system typically organizes the array of sectors on the storage as a set of named byte streams-files. The file names are typically stored in a hierarchy of names—directory structure.
Every logical operation of a file system such as file creation, file reads and writes, etc. has to be translated to a sequence of storage read and/or write operations. A file write operation reads some data from the storage, makes decisions and computations, based on that data, and then writes some data back to the storage. Execution of such an operation thus results in changing some of the on-storage structures that represent and support abstract entities like files, directories, free space, etc.
A disk access is typically about 100 to 1000 times slower then access to system RAM. To minimize the amount of reads and writes a specific part of the system RAM is designated to keep images of on-storage data—cache. In this way, instead of accessing storage for every read or write request, a read or write can be made to the cache memory instead of disk. The memory image is initialized on first access by read from disk and is written back when released. Thus, a computer can download data from a remote storage and work on it locally from an electrically (and thus quickly accessible) addressable cache.
In certain conventional applications, computer systems sometimes include one or more processors and corresponding software that supports access to corresponding externally attached storage. For example, according to certain conventional applications, multiple computers may couple to a common shared storage system. Two or more of the computers may be afforded access to the same files stored in the shared storage system.
To prevent file corruption, conventional applications supporting access to the shared storage typically employ some means for preventing two or more users from modifying the same file at the same time. Otherwise, the two or more computers having shared access to a given file in the shared storage system may simultaneously access and modify the same file. For example, one user may modify the file with a first set of changes. Another user may attempt modify the file with a second set of changes. Without an accounting for each user's changes, some of the changes to the file may be lost when the users eventually store the modified file back to the shared storage system. Thus, it is quite possible that the latter user writing the file to storage may overwrite any changes by the first user storing the file to storage. Thus, simultaneous access to the same file in storage is sometimes avoided.
There exist conventional techniques to enable multiple users to modify the same file in a storage system. For example, according to one conventional application, each of multiple computers couple to a server device that, in turn, selectively provides access to a corresponding storage system. While a first user at a corresponding computer modifies a file in the storage system, the server device prevents other users from accessing (e.g., writing to) the same file to prevent two different users from simultaneously modifying the same file. After the first user completes any modifications and updates to the file in the storage device, the server device may allow another user to access the file in the storage system. Thus, the server device prevents corruption of shared files in the storage system by restricting access to any files presently being modified by other users. In other words, only one user is allowed to access and modify a file at a time.